home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre3.z / postgre3 / src / lib / H / obsolete / misc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  3.6 KB  |  110 lines

  1. #ifndef MiscIncluded       /* include this file only once */
  2. #define MiscIncluded 1
  3. /* ----------------
  4.  *    THIS FILE IS GOING AWAY -cim 6/8/90
  5.  * ----------------
  6.  */
  7.  
  8. #define MISC_H_OBSOLETE 1
  9. #define MISC_H_OBSOLETE 2
  10.     
  11. #if 0
  12. /* ----------------------------------------------------------------
  13.  * misc.h
  14.  *      miscellanous defines used in POSTGRES
  15.  *      
  16.  * Identification:
  17.  *      $Header: /private/postgres/src/lib/H/obsolete/RCS/misc.h,v 1.1 1990/06/12 21:25:12 cimarron Version_2 $
  18.  * ----------------------------------------------------------------
  19.  */
  20. static char     misc_h[] = "$Header: /private/postgres/src/lib/H/obsolete/RCS/misc.h,v 1.1 1990/06/12 21:25:12 cimarron Version_2 $";
  21.  
  22. /* ----------------------------------------------------------------
  23.  *    misc #defines
  24.  * ----------------------------------------------------------------
  25.  */
  26.  
  27. #define FALSE 0
  28. #define TRUE 1
  29.  
  30. #define NullPointer        ((Pointer) 0)
  31.  
  32. #define MaxInteger         2147483647
  33.  
  34. #define InvalidLogXid           InvalidTransactionId
  35. #define InvalidLogBlockNumber   4294967295
  36. #define UnknownLogBlockNumber   4294967294
  37. #define InvalidIndex            4294967295
  38.  
  39. /* InvalidLogBlockNumber = 2^32 - 1 = max(uint32)
  40.  * UnknownLogBlockNumber = 2^32 - 2 = max(uint32) - 1 */
  41.  
  42. /* ----------------------------------------------------------------
  43.  *   RelationTupleFormGetRelationName is an accessor function
  44.  *   that should be added to rel.h
  45.  * ----------------------------------------------------------------
  46.  */
  47.  
  48. #define RelationTupleFormGetRelationName(relationTuple) \
  49.    (relationTuple->relname)
  50.  
  51. /* ----------------------------------------------------------------
  52.  *    OFFSET is useful to get the offset of a member in
  53.  *    another structure
  54.  * ----------------------------------------------------------------
  55.  */
  56.  
  57. #define OFFSET(type,mem)    ((int) &(((type *) NULL)->mem))
  58.  
  59. /* ----------------------------------------------------------------
  60.  *    puts adds a newline, fputs doesnt so we use
  61.  *    Puts. This also eliminates the confusion caused
  62.  *    by fputs stupid backward arguments
  63.  * ----------------------------------------------------------------
  64.  */
  65.  
  66. #define Puts(s) fputs(s, stdout)
  67.  
  68. /* ----------------------------------------------------------------
  69.  *    miscellaneous programming style #defines
  70.  * ----------------------------------------------------------------
  71.  */
  72.  
  73. #define forever for (;;)
  74.  
  75. #define FUNCTION  /* empty macro used for cross referencing */
  76.  
  77. #define INCOMPLETE /* empty macro */
  78.  
  79. #define INEFFICIENT /* bad function - revise it */
  80.  
  81. #define NOTTESTED   /* function not fully tested (perhaps buggy) */
  82.  
  83. /* ----------------------------------------------------------------
  84.  *    Debugging stuff
  85.  * ----------------------------------------------------------------
  86.  */
  87.  
  88. #define NoDebugLevel 0
  89. #define AccessDebugLevel NoDebugLevel+2
  90. #define GeneralDebugLevel AccessDebugLevel+2
  91. #define PrintDebugLevel GeneralDebugLevel+2
  92. #define ComputeDebugLevel PrintDebugLevel+2
  93. #define FormDebugLevel ComputeDebugLevel+2
  94. #define RepeatPrintDebugLevel FormDebugLevel+2
  95. #define RepeatComputeDebugLevel RepeatPrintDebugLevel+2
  96. #define RepeatFormDebugLevel RepeatComputeDebugLevel+2
  97.  
  98. #define NoInternalDebugLevel NoDebugLevel+1
  99. #define AccessInternalDebugLevel AccessDebugLevel+1
  100. #define GeneralInternalDebugLevel GeneralDebugLevel+1
  101. #define PrintInternalDebugLevel PrintDebugLevel+1
  102. #define ComputeInternalDebugLevel ComputeDebugLevel+1
  103. #define FormInternalDebugLevel FormDebugLevel+1
  104. #define RepeatPrintInternalDebugLevel RepeatPrintDebugLevel+1
  105. #define RepeatComputeInternalDebugLevel RepeatComputeDebugLevel+1
  106. #define RepeatFormInternalDebugLevel RepeatFormDebugLevel+1
  107.  
  108. #endif
  109. #endif /* defined MiscIncluded */
  110.